package com.iris.live.services.services;

import com.iris.live.services.data.models.Lsh车型Model;
import com.iris.live.services.models.RequestBase;
import com.iris.live.services.models.ResultData;

import java.io.OutputStream;
import java.math.BigDecimal;
import java.sql.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by sxy on 2016/8/1.
 */
public interface CarService {

    List getCarDetail(GetCarDetailRequest request);

    List getCarType(GetCarDetailRequest request);

    List getCarLevel(GetCarDetailRequest request);

    List getCarBrand(GetCarDetailRequest request);

    Lsh车型Model saveCarDetail(Lsh车型Model model);

    List<Lsh车型Model> saveCarDetailBatch(List<Lsh车型Model> modelList);

    List getAllCar(String permit);

    List getAllModel(String permit, String type);

    int getCarNumber(GetCarNumberRequest request);

//    boolean updateCarlogByCode(UpdateCarlogByCodeReq req);

//    boolean updateLshStoreStatus(UpdateLshStoreStatusReq req);

    List getLshStoreByProIdAndPermit(UpdateLshStoreStatusReq req);

    List getCurrCarStatus(GetCurrCarStatusReq req);

    boolean updateLshMsgByCarStatus(List<UpdateLshMsgByCarStatusReq> reqList,String license,String sendUser);

    boolean updateCarInfos(UpdateCarInfosReq req);

    ResultData getCarDetailBatchAlls(getCarDetailBatchAlls req, String permit, String postman);

    ResultData getOneCarDetailBatchAlls(getCarDetailBatchAlls req, String permit, String postman);

    ResultData saveCarDetailBatchAlls(List<getCarDetailBatchAlls> req, String permit, String postman);


    ResultData updateCarTypeCpkid(List<getCarDetailBatchAlls> req, String permit, String postman);

    ResultData IsExistCarTypeCpkid(getCarDetailBatchAlls req, String permit, String postman);

    ResultData getReturnCarList(CarService.ReturnCarParam  req,String permit);

    void updateReturnCar(String stockNo,String operator,ResultData resultData);

    void sendStockChangeMessage(java.util.Date oldInStockDate,java.util.Date newInStockDate,String permit,String user,String stockNumber);

    void exportStockInfo(String dealer, Map map, RequestBase request, OutputStream response);

    ResultData getLogisticsStatus();
    static class getCarDetailBatchAlls extends RequestBase {
        public String origin;//来源
        public String brand; //品牌
        public String carClass;//车系 就是 级别
        public String carModel;//车型
        public String carStyle;//车款 ---车型详细

        public String Baumuster;//车型_de
        public String VariantDesc;//车型详细_cn
        public String PurchasePrice;  //
        public String MSRP;//
        public String Segments;//
        public String Chassis;//
        public String ChassisDescript;//
        public String 座位;//13
        public String ReleaseDate;//
        public String 退市日期;//
        public String 启用日期;//16


        public String 停用日期;//
        public String Type;//
        public String Model;//
        public String ModelDesc;//
        public String Variant;//21
        public String VariantDescCN;//
        public String VariantDescEN;//
        public String Factory1;//
        public String Factory2;//


        public String BuildDate;//
        public String 备注;//备注
        public String ModelCode;//
        public String ModelName;//
        public String 更新账号;//
        public String 更新时间;//31

        public String cPkid;// 32

        public String appearance;//车型外观

    }

    static class UpdateLshStoreStatusReq {
        public String 生产号;
        public String 许可;
        public String 调车物流状态;
        public String 库存编号;
    }

    //    static class UpdateCarlogByCodeReq {
//        public String stock_code;
//        public java.sql.Date stock_in_date;
//        public String stock_in_user;
//    }
    static class GetCarDetailRequest extends RequestBase {
        public String source;
        public String brand;
        public String level;
        public String type;
    }

    static class GetCarNumberRequest extends RequestBase{
        public String source;
        public String brand;
        public String level;
        public String type;
        public String detail;
    }

    static class GetCurrCarStatusReq {
        public String permit;
    }
    static class UpdateLshMsgByCarStatusReq {
        public String 车辆物流状态;
        public String 销售顾问;
        public String 顾客姓名;
        public String 电话号码;
        public String 订单申请日期;
        public String 车型详细;
        public String 颜色;
    }

    static class UpdateCarInfosReq {
        public String 生产号;
        public String 是否更新库存表;
        public String 是否更新库存利润表;
        public String 是否更新报价订单表;
        public Date 批发付款到期日;
        public Date 批发日期;
        public Date 预计到店日期;
        public Date 入库日期;
        public String 店内车辆位置;
        public String 二次PDI结果;
        public String 三次PDI结果;
        public String 关单号;
        public String 商检单号;
        public String 合格证号;
        public String 关单到店状态;
        public String 商检单到店状态;
        public String 合格证到店状态;
        public Date 二次PDI完成日期;
        public Date 三次PDI完成日期;
        public Date 出库日期;
        public Date HOLD日期;
        public Date 申请释放日期;
        public String 车辆受损情况;
        public Date 建议三次PDI日期;
        public String NBI车辆状态;
        public String 车辆物流状态;
        public String 上报厂家;
        public String 上报SIMS;
        public Date 上报厂家日期;
        public Date 上报SIMS日期;
        public BigDecimal 零售SI;
        public BigDecimal 批发SI;
        public Date 订金交付日期;
        public Date 退订金转账日期;
        public BigDecimal 订金加减金额;
        public Date 订金加减日期;

        public String 采购批发商;
        public BigDecimal 协商调车款项金额;
        public String 车款年份;
        public String permit; // 许可
        public String user;   // 用户
    }
    static class ReturnCarParam extends RequestBase {
        public String startWholesaleDate;//开始批发日期
        public String endWholesaleDate;//结束批发日期

        public String state;//状态: all:全部 0:未退  1:已退
        public String productionNo;//生产号
        public String frameNo;//车架号
        public String dealer;//经销商

        public String stockNo;//库存编号
        public String operator;//操作人

    }
}
